package org.andao.core.support.context;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * 扩展的ServletContextListener.
 * @author Seewo software - Marco.hu(huzhiguo@cvte.cn)
 *
 */
public class ServletContexLoaderListener  implements ServletContextListener  {	
	
	public void contextDestroyed(ServletContextEvent servletContextEvent) {
		//TODO
	}

	public void contextInitialized(ServletContextEvent servletContextEvent) {
		//获取webroot webapps 根目录 
		String webAppRootKey = servletContextEvent.getServletContext().getRealPath("/");  
		System.setProperty("app.root" , webAppRootKey);	
	}
}
